{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "d98212cf-f0e9-43b5-b80f-8e301ad4cf22",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3*4的数组:\n",
      " [[ 60  79  96  80]\n",
      " [110 120  90 800]]\n",
      "第三行和第一行的元素:\n",
      " [[ 60  79  96  80]\n",
      " [110 120  90 800]]\n",
      "第三行和第二列和第一行和第一列的元素 [ 79 110]\n",
      "大于80小一且等于100的所有元素: [90 89 95 92 96]\n",
      "小于等于80的所有元素: [77 60 79 80]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "arr=np.array([[110,120,90,800],[89,95,77,92],[60,79,96,80]])\n",
    "print('3*4的数组:\\n',arr[[2,0]])\n",
    "print('第三行和第一行的元素:\\n',arr[[2,0]])\n",
    "print('第三行和第二列和第一行和第一列的元素',arr[[2,0],[1,0]])\n",
    "print('大于80小一且等于100的所有元素:',arr[(arr>80)&(arr<=100)])\n",
    "print('小于等于80的所有元素:',arr[arr<=80])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "65f71a9b-c2e6-4a0f-8f1d-dfbad29ca572",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5e83d361-9dfe-4bcb-80d0-7600bd6019e5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "42e51c63-f4c5-4e83-b469-c77a5015557f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
